package org.dromara.report.order.controller;

import lombok.RequiredArgsConstructor;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.dromara.common.web.core.BaseController;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.report.order.domain.vo.ReportConsumeOrderTotalVo;
import org.dromara.report.order.domain.bo.ReportConsumeOrderTotalBo;
import org.dromara.report.order.service.IReportOrderService;
import org.dromara.common.mybatis.core.page.TableDataInfo;

/**
 * 报表-消费订单汇总
 *
 * @author wdm
 * @date 2024-03-01
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/report/order")
public class ReportConsumeOrderTotalController extends BaseController {

    private final IReportOrderService reportOrderService;

    /**
     * 查询报表-消费订单汇总列表
     */
    @SaCheckPermission("report:order:consumeOrderTotal")
    @GetMapping("/consumeOrderTotal")
    public TableDataInfo<ReportConsumeOrderTotalVo> consumeOrderTotal(ReportConsumeOrderTotalBo bo, PageQuery pageQuery) {
        return reportOrderService.queryConsumeOrderPageList(bo, pageQuery);
    }

}
